package vn.team.clipxonxao.request;

import vn.team.clipxonxao.respone.TotalPageRespone;

import com.mk.fw.connection.APIDataResponse;
import com.mk.fw.connection.APIParams;
import com.mk.fw.connection.APIRequest;
import com.mk.fw.connection.APIResponse;

public class TotalPageRequest extends APIRequest {

	private int idCategory;
	
	/**
	 * 
	 */
	private static final long serialVersionUID = 6918920665662819611L;

	public TotalPageRequest(int idCategory){
		this.idCategory = idCategory;
	}
	
	@Override
	public APIParams getParams() {
		// cmd=getpages&param=cateid&cateid=3
		APIParams params = new APIParams();
		params.addParams("cmd", "getpages");
		params.addParams("param", "cateid");
		params.addParams("cateid", ""+idCategory);
		return params;
	}

	@Override
	public APIResponse parseResponse(APIDataResponse response) {
		return new TotalPageRespone(response);
	}

}
